//
//  OosEntry.m
//  Oos4ios
//
//  Created by Pablo Gonzalez on 2/23/11.
//  Copyright 2011 11870.com. All rights reserved.
//

#import "OosEntry.h"
#import "OosAuthor.h"


@implementation OosEntry

- (void) addExtensionDeclarations 
{
	[super addExtensionDeclarations];
	
	Class entryClass = [self class];
	
	[self addExtensionDeclarationForParentClass:entryClass childClasses: 
	 // Oos extensions
	 [OosUrl class], [OosAuthor class], [OosSlug class], nil];
}

#pragma mark <oos:slug>

- (OosSlug *) slug									
{ 
	return [self objectForExtensionClass:[OosSlug class]]; 
}
- (void) setSlug: (OosSlug *) slug					
{ 
	[self setObject:slug forExtensionClass:[OosSlug class]];
}

#pragma mark <link rel="alternate">

- (void) setPermalink:(GDataLink *)permalink
{
	[self addLink:permalink];
}
- (GDataLink *) permalink
{
	return [self linkWithRelAttributeValue:@"alternate"];
}

#pragma mark <author>

- (OosAuthor *) author									
{ 
	return [self objectForExtensionClass:[OosAuthor class]]; 
}
- (void) setAuthor: (OosAuthor *) author					
{ 
	[self setObject:author forExtensionClass:[OosAuthor class]];
}

@end
